#include "StdAfx.h"
#include "Graphic.h"

namespace Graphics
{
	Graphic::Graphic(void)
	{
	}

	Graphic::~Graphic(void)
	{
	}

	bool Graphic::Render()
	{
		bool result = true;
		for(std::list<Renderable* const>::iterator i = m_RenderList.begin(); i != m_RenderList.end(); i++)
		{
			Renderable* const obj=*i;
			if(obj != NULL)
			{
				if(!obj->Render(this))
				{
					result = false;
				}
			}
		}
		return result;
	}
	void Graphic::Add(Renderable* const obj)
	{
		m_RenderList.push_back(obj);
	}
	void Graphic::Remove(Renderable* const obj)
	{
		m_RenderList.remove(obj);
	}
}